extends Camera2D
var player:CharacterBody2D = null

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	player = get_tree().get_first_node_in_group("player")
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	if global_position.x+get_viewport_rect().size.x/2/zoom.x>=get_tree().root.get_visible_rect().size.x:
		return
	if global_position.x < player.global_position.x:
		global_position.x = player.global_position.x
	pass
